/*插件:为消息添加前缀*/

k_plugins.prefix={
name:'插件示例：前缀',
ui:function(){
	   return '前缀:<input type="text" id="prefix" value="'+getCookie('msg_prefix')+'" class="border1" />';
   },
init:function(){
	     $('#prefix').blur(function(){
			     setCookie('msg_prefix',$('#prefix').val(),1000);
			     });
     },
beforesend:function(msg){
		   return $.trim(getCookie('msg_prefix')+' '+msg);
	   }

};

/*插件:为消息添加后缀*/
k_plugins.suffix={
name:'插件示例：后缀',
ui:function(){
	   return '后缀:<input type="text" id="suffix" value="'+getCookie('msg_suffix')+'" class="border1" />';
   },
init:function(){
	     $('#suffix').blur(function(){
			     setCookie('msg_suffix',$('#suffix').val(),1000);
			     });
     },
beforesend:function(msg){
		   return $.trim(msg+' '+getCookie('msg_suffix'));
	   }
};

/*plugin:Switch off Geo-information*/
k_plugins.geoinformation={
name:'Geo',
ui:function(){
    return '<input type="checkbox" id="checkboxgeo" value="stop" '+(getCookie('stopgeoinfo') == 'stop'?'checked':'')+' />Prevent kwestion from sending Geo-information';
   },
init:function(){
	     $('#checkboxgeo').click(function(){
                 setCookie('stopgeoinfo',($('#checkboxgeo:checked').size()>0?"stop":''),1000);
			     });
     }
};

